package com.gecba.system.entity;

import com.gecba.system.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 *@author ChenBo
 *@date 2021/7/19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_user")
@ApiModel(value = "系统用户")
@DynamicInsert
@DynamicUpdate
public class SysUser extends BaseEntity {

    /** 用户名称 */
    private String username;
    /** 用户密码 */
    private String password;
    /** 性别 */
    private Integer sex;
    /** 头像 */
    private String avatar;
    /** 昵称 */
    private String realName;
    /** md5盐值 */
    private String salt;
    /** 手机号 */
    private String phone;
    /** 邮箱 */
    private String email;
    /** 状态 */
    private Integer status;

    /** 用户角色 */
    @Transient
    private String roles;


}
